import request from "@/utils/request";

// 查询商家入驻信息列表
export function listMerchant(query) {
  return request({
    url: "/business/merchant/list",
    method: "get",
    params: query,
  });
}

// 查询商家入驻信息所有列表
export function listAllMerchant(query) {
  return request({
    url: "/business/merchant/listAll",
    method: "get",
    params: query,
  });
}

// 查询商家入驻信息详细
export function getMerchant(id) {
  return request({
    url: "/business/merchant/getInfo/" + id,
    method: "get",
  });
}

// 新增商家入驻信息
export function addMerchant(data) {
  return request({
    url: "/business/merchant/add",
    method: "post",
    data: data,
  });
}

// 修改商家入驻信息
export function updateMerchant(data) {
  return request({
    url: "/business/merchant/edit",
    method: "post",
    data: data,
  });
}

// 删除商家入驻信息
export function delMerchant(id) {
  return request({
    url: "/business/merchant/remove/" + id,
    method: "get",
  });
}

// 新增商家入驻信息
export function openStatusMerchant(data) {
  return request({
    url: "/business/merchant/openStatus",
    method: "post",
    data: data,
  });
}
